<?php
namespace app\validate;

use share\validate\SceneValidate;

class NotesInfoValidate extends SceneValidate{

    protected $rule = [
        'id' =>  'require',
        'contactWay' => 'require|min:3|max:45',
        'notes' => 'require|min:2|max:2000',
        'contactType' => 'require|min:2|max:30',
        'appVersion'=> 'require|min:2|max:30',
    ];  
    
    protected $sceneRules = [
        'list' => [
            'contactWay' => 'length:2,200',
            'notes' => 'length:2,200',
            'appVersion'=> 'length:2,10',
        ],
    ];

    protected $scene = [
        'add' => ['contactWay','notes'],
        'addV2' => ['contactWay','notes','contactType'],
        'del' => ['id'],
        'list' => ['contactWay','notes','appVersion'],
    ];
}